//package depricated;
//
//import java.io.IOException;
//import java.net.MalformedURLException;
//import java.net.URL;
//import java.util.List;
//
//import javax.swing.JOptionPane;
//
//import com.google.gdata.client.*;
//import com.google.gdata.data.*;
//import com.google.gdata.util.*;
//
//import com.google.gdata.client.youtube.*;
//import com.google.gdata.data.youtube.*;
//import com.google.gdata.data.extensions.*;
//import java.io.BufferedReader;
//import java.io.InputStreamReader;
//
//public class GTubeServices {
//
//	/**
//	 * Public variables
//	 */
//	public static String username;
//	public static String pass;
//	public static String myEntryTitle;
//	public static String loginStart = "Logging in....";
//	public static String loginComplete = "Login Complete!";
//
//
//	// public static BloggerService myService;
//
//	// empty method
//	public GTubeServices(String user, String password) throws AuthenticationException, IOException {
//		super();
//		//user = username;
//		//password = pass;
//	}
//	
//	public static void main(String[] args) throws AuthenticationException, IOException {
//		GTubeServices b = new GTubeServices(username, pass);
//		b.YouTube();
//	}
//
//	/**
//	 * Implements the blogger service code
//	 * @throws AuthenticationException 
//	 * @throws IOException 
//	 */
//	public void YouTube() throws AuthenticationException, IOException {
//		
//		try{
//			
//			// Uses a URL modified with the username, logs in and gathers the information in the form of a list
//			// Note, as of yet, this only gathers information from your default calendar.
//			//System.setProperty("https.proxyHost", "proxy4.ucd.ie");
//    		//System.setProperty("https.proxyPort", "8484");
//			
//    		System.out.println(loginStart);
//    		
//			username = JOptionPane.showInputDialog(null, "Enter Username");
//    		pass = JOptionPane.showInputDialog(null, "Enter Password");
//    		
//    		YouTubeService myService = new YouTubeService("Weeks - YouTube Subscriptions");
//			myService.setUserCredentials(username, pass);
//			
//			System.out.println(loginComplete);
//			
//			// Request the feed
//		    final URL feedUrl = new URL("http://www.blogger.com/feeds/default/blogs");
//		    Feed resultFeed = myService.getFeed(feedUrl, Feed.class);
//
//		    // Print the results
//		    System.out.println();
//		    System.out.println(resultFeed.getTitle().getPlainText());
//		    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
//		      Entry entry = resultFeed.getEntries().get(i);
//		      System.out.println("Title:	" + entry.getTitle().getPlainText());
//		      System.out.println("id:		" + entry.getId());
//		      System.out.println("Updated:	" + entry.getUpdated());
//		      System.out.println();
//		    }
//		
//		//Exception handling
//    	} catch (MalformedURLException e) {
//            System.out.println("Invalid URL");
//        } catch (IOException e) {
//            System.out.println("Unable to execute");
//        } catch (AuthenticationException e){
//        	System.out.println("Authentication Problem");
//        } catch (ServiceException e){
//        	System.out.println("Service Problem"); 
//        }
//        System.exit(0);
//    }
//
//	/**
//	 * Required methods for gathering data
//	 * @return
//	 * @throws IOException
//	 */
//	private static String readLine() throws IOException {
//		   BufferedReader bufferedReader = new BufferedReader(
//		       new InputStreamReader(System.in));
//		   return bufferedReader.readLine();
//		 }
//
//
//	private static int readInt() throws IOException {
//		  	String input = readLine();
//		  	return Integer.parseInt(input);
//	}
//
//	private static void printUnderlined(String feedTitle) {
//		    System.out.println(feedTitle);
//		    for (int i = 0; i < feedTitle.length(); ++i) {
//		      System.out.print("-");
//		    }
//		    System.out.println("\n");
//	}
//
//}
